package com.bdqn.t320.ch04.config;

import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.RootBeanDefinition;
import org.springframework.context.annotation.ImportBeanDefinitionRegistrar;
import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.type.AnnotationMetadata;

public class ImportSelectorTest implements ImportBeanDefinitionRegistrar {
    @Override
    public void registerBeanDefinitions(AnnotationMetadata annotationMetadata, BeanDefinitionRegistry beanDefinitionRegistry) {
        RootBeanDefinition rootBeanDefinition = new RootBeanDefinition(MybatisPlusConfig.class);
        RootBeanDefinition rootBeanDefinition1 = new RootBeanDefinition(Mybatis111111.class);
        beanDefinitionRegistry.registerBeanDefinition("aaaaaaaaaaa",rootBeanDefinition);
        beanDefinitionRegistry.registerBeanDefinition("bbbbbbbbbb",rootBeanDefinition1);
    }
/*    @Override
    public String[] selectImports(AnnotationMetadata annotationMetadata) {
        return new String[]{"com.bdqn.t320.ch04.config.Mybatis111111","com.bdqn.t320.ch04.config.MybatisPlusConfig"};
    }*/
}
